DESCRIPTION = "A XFCE phytium demo image."

require phytium-image-networking.bb

IMAGE_INSTALL = "packagegroup-core-boot \
    packagegroup-core-x11 \
    packagegroup-xfce-base \
    kernel-modules \
"

IMAGE_FEATURES += "package-management \
"

inherit features_check
REQUIRED_DISTRO_FEATURES = "x11"

SYSTEMD_DEFAULT_TARGET = "graphical.target"

VIRTUAL-RUNTIME_graphical_init_manager = "xserver-xfce-init"

IMAGE_LINGUAS = "en-gb en-gb.iso-8859-1 en-us en-us.iso-8859-1 zh-cn"

LICENSE = "MIT"

export IMAGE_BASENAME = "core-image-xfce"

inherit core-image  phy-utils

ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'rootfs_ln_xorg;', '', d)}"

ROOTFS_POSTPROCESS_COMMAND += "rootfs_copy_core_image;rootfs_copy_initrd;"

do_rootfs[depends] += "phytium-image-initramfs:do_image_complete"

PACKAGE_ARCH = "${MACHINE_ARCH}"

IMAGE_FSTYPES = "tar.gz  ext4"

IMAGE_INSTALL += " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'packagegroup-phy-virtualization', '', d)} \
    packagegroup-phy-mfgtools \
    openssh \
    packagegroup-phy-gstreamer1.0-full  \ 
    ${@bb.utils.contains('DISTRO_FEATURES', 'audio', 'packagegroup-phy-tools-audio', '', d)} \
    udev-extra-rules \
    gtk+3 default-locale xdg-user-dirs \
    packagegroup-phy-tools-core-dev \
    packagegroup-gui-base \
    ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'packagegroup-optee', '', d)} \
"
